package com.hex.es.service;

import com.hex.es.annotation.EsBuildParamTypeInfo;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder;

/**
 * @description: 参数构建校验处理接口
 * @author: Hex
 * @date: 2019/11/13 16:29
 */
public interface ParamTypeCheckInterface extends ExecutionLinkBuild{

    /**
     * 参数构建
     * @param paramName
     * @param paramValue
     * @param boolQueryBuilder
     * @param searchQueryBuilder
     * @param esBuildParamTypeInfo
     * @throws IllegalAccessException
     */
    void handler(String paramName, Object paramValue, BoolQueryBuilder boolQueryBuilder, NativeSearchQueryBuilder searchQueryBuilder, EsBuildParamTypeInfo esBuildParamTypeInfo) throws IllegalAccessException;

    /**
     * 参数校验准入
     * @param object
     * @return
     */
    Boolean checkType(Object object);

}
